<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1,
            maximum-scale=1">
    <link rel="stylesheet" href="/static/lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="/static/css/public.css" media="all">
    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>

</head>

<body>
    <div class="layuimini-container">
        <div class="layuimini-main">


            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend>{$info.name}--编辑用户基本信息</legend>
            </fieldset>

            <form class="layui-form" action="" id="submitform">

                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label">ID</label>
                    <div class="layui-input-block">
                        <input type="text" name="id" required lay-verify="required" placeholder="请版本标题推荐四个字"
                            autocomplete="off" class="layui-input" value="{$info.user_id}">
                    </div>
                </div>



                <div class="layui-form-item">
                    <label class="layui-form-label">工号</label>
                    <div class="layui-input-block">
                        <input type="text" name="job_number" placeholder="请输入工号" lay-verify="required"
                            lay-reqtext="工号不能为空！！" class="layui-input" value="{$info.job_number}">
                    </div>
                </div>



                <div class="layui-form-item">
                    <label class="layui-form-label">姓名</label>
                    <div class="layui-input-block">
                        <input type="text" name="name" placeholder="请输入姓名" lay-verify="required" value="{$info.name}"
                            class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">性别</label>
                    <div class="layui-input-block">
                        <select name="sex" lay-filter="sex">
                            {if $info.sex eq "男"}
                            <option value="男" selected>男</option>
                            <option value="女">女</option>
                            {else \}
                            <option value="男">男</option>
                            <option value="女" selected>女</option>
                            {/if}

                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">所在单位</label>
                    <div class="layui-input-block">
                        <select name="company_id" lay-filter="user_id">
                            <option value=""></option>
                            {volist name="company" id="vo"}
                            <option value="{$vo.id}"{if $info.company_id eq $vo.id}selected{/if}>{$vo.company}</option>
                            {/volist}
                        </select>
                    </div>
                </div>



                <div class="layui-form-item">
                    <label class="layui-form-label">生日</label>
                    <div class="layui-input-block">
                        <input type="text" id="birthday" name="birthday" autocomplete="off" class="layui-input">
                    </div>

                </div>

                <div class="layui-form-item">

                    <label class="layui-form-label">参加工作时间</label>
                    <div class="layui-input-block">
                        <input type="text" id="working_hours" name="working_hours" autocomplete="off"
                            class="layui-input">
                    </div>

                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">最高学历</label>
                    <div class="layui-input-block">
                        <input type="text" name="highest_education" placeholder="请输入最高学历"
                            value="{$info.highest_education}" lay-verify="required" lay-reqtext="最高学历不能为空！！"
                            class="layui-input">
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">职称</label>
                    <div class="layui-input-block">
                        <input type="text" name="title" placeholder="请输入职称" lay-verify="required" lay-reqtext="职称不能为空！！"
                            value="{$info.title}" class="layui-input">
                    </div>
                </div>



                <div class="layui-form-item">
                    <label class="layui-form-label">任职类别</label>
                    <div class="layui-input-block">
                        <select name="job_category" lay-filter="job_category">
                            {if $info.job_category eq "专职教师"}
                            <option value="专职教师" selected>专职教师</option>
                            <option value="管理人员">管理人员</option>
                            <option value="教辅人员">教辅人员</option>
                            <option value="工勤人员">工勤人员</option>
                            <option value="专职辅导员">专职辅导员</option>
                            <option value="兼职辅导员">兼职辅导员</option>
                            {elseif $info.job_category eq "管理人员"}
                            <option value="专职教师">专职教师</option>
                            <option value="管理人员" selected>管理人员</option>
                            <option value="教辅人员">教辅人员</option>
                            <option value="工勤人员">工勤人员</option>
                            <option value="专职辅导员">专职辅导员</option>
                            <option value="兼职辅导员">兼职辅导员</option>
                            {elseif $info.job_category eq "教辅人员"}
                            <option value="专职教师">专职教师</option>
                            <option value="管理人员">管理人员</option>
                            <option value="教辅人员" selected>教辅人员</option>
                            <option value="工勤人员">工勤人员</option>
                            <option value="专职辅导员">专职辅导员</option>
                            <option value="兼职辅导员">兼职辅导员</option>
                            {elseif $info.job_category eq "工勤人员"}
                            <option value="专职教师">专职教师</option>
                            <option value="管理人员">管理人员</option>
                            <option value="教辅人员">教辅人员</option>
                            <option value="工勤人员" selected>工勤人员</option>
                            <option value="专职辅导员">专职辅导员</option>
                            <option value="兼职辅导员">兼职辅导员</option>
                            {elseif $info.job_category eq "专职辅导员"}
                            <option value="专职教师">专职教师</option>
                            <option value="管理人员">管理人员</option>
                            <option value="教辅人员">教辅人员</option>
                            <option value="工勤人员">工勤人员</option>
                            <option value="专职辅导员" selected>专职辅导员</option>
                            <option value="兼职辅导员">兼职辅导员</option>
                            {elseif $info.job_category eq "兼职辅导员"}
                            <option value="专职教师">专职教师</option>
                            <option value="管理人员">管理人员</option>
                            <option value="教辅人员">教辅人员</option>
                            <option value="工勤人员">工勤人员</option>
                            <option value="专职辅导员">专职辅导员</option>
                            <option value="兼职辅导员" selected>兼职辅导员</option>
                            {/if}
                        </select>
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">当前行政职务</label>
                    <div class="layui-input-block">
                        <input type="text" name="current_administrative_position"
                            value="{$info.current_administrative_position}" placeholder="请输入当前行政职务"
                            lay-verify="required" lay-reqtext="当前行政职务不能为空！！" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">当前行政职务级别</label>
                    <div class="layui-input-block">
                        <input type="text" name="current_administrative_position_level" placeholder="请输入当前行政职务级别"
                            lay-verify="required" lay-reqtext="当前行政职务级别不能为空！！"
                            value="{$info.current_administrative_position_level}" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">参加工作时间</label>
                    <div class="layui-input-block">
                        <input type="text" id="tenure" name="tenure" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">兼职行政职务</label>
                    <div class="layui-input-block">
                        <input type="text" name="part_time_administrative_position"
                            value="{$info.part_time_administrative_position}" placeholder="请输入当前兼职行政职务"
                            lay-verify="required" lay-reqtext="兼职行政职务不能为空！！" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">兼职行政职务级别</label>
                    <div class="layui-input-block">
                        <input type="text" name="part_time_administrative_position_level"
                            value="{$info.part_time_administrative_position_level}" placeholder="请输入兼职行政职务级别"
                            lay-verify="required" lay-reqtext="兼职行政职务级别不能为空！！" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">兼职单位</label>
                    <div class="layui-input-block">
                        <input type="text" name="part_time_company" placeholder="请输入兼职单位" lay-verify="required"
                            lay-reqtext="兼职单位不能为空！！" value="{$info.part_time_company}" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">兼职任职时间</label>
                    <div class="layui-input-block">
                        <input type="text" id="part_time_tenure" name="part_time_tenure" autocomplete="off"
                            class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">上任行政职务</label>
                    <div class="layui-input-block">
                        <input type="text" name="previous_administrative_position"
                            value="{$info.previous_administrative_position}" placeholder="请输入上任行政职务"
                            lay-verify="required" lay-reqtext="上任行政职务不能为空！！" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">上任行政职务级别</label>
                    <div class="layui-input-block">
                        <input type="text" name="previous_administrative_position_level"
                            value="{$info.previous_administrative_position_level}" placeholder="请输入上任行政职务级别"
                            lay-verify="required" lay-reqtext="上任行政职务级别不能为空！！" class="layui-input">
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">上任任职时间</label>
                    <div class="layui-input-block">
                        <input type="text" id="previous_tenure" name="previous_tenure" autocomplete="off"
                            class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">身份证号</label>
                    <div class="layui-input-block">
                        <input type="text" name="idcard_number" placeholder="请输入身份证号" value="{$info.idcard_number}"
                            lay-verify="required" lay-reqtext="身份证号不能为空！！" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">联系方式</label>
                    <div class="layui-input-block">
                        <input type="text" name="contact_information" placeholder="请输入联系方式"
                            value="{$info.contact_information}" lay-verify="required" lay-reqtext="联系方式不能为空！！"
                            class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">银行卡号</label>
                    <div class="layui-input-block">
                        <input type="text" name="bank_card_number" placeholder="请输入银行卡号"
                            value="{$info.bank_card_number}" lay-verify="required" lay-reqtext="银行卡号不能为空！！"
                            class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">最高学历职称</label>
                    <div class="layui-input-block">
                        <input type="text" name="highest_academic_title" placeholder="请输入最高学历职称"
                            value="{$info.highest_academic_title}" lay-verify="required" lay-reqtext="最高学历职称不能为空！！"
                            class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">当年起薪时间</label>
                    <div class="layui-input-block">
                        <input type="text" id="starting_salary_time_of_the_current_year"
                            name="starting_salary_time_of_the_current_year" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">停发工资时间</label>
                    <div class="layui-input-block">
                        <input type="text" id="stoping_salary_time_of_the_current_year"
                            name="stoping_salary_time_of_the_current_year" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
                        <button type="reset" class="layui-btn
                                layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
        </div>
    </div>

    <script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
    <!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
    <script>
        layui.use(['form', 'layedit', 'laydate'], function () {
            var form = layui.form
                , layer = layui.layer
                , layedit = layui.layedit
                , laydate = layui.laydate;

            //日期
            laydate.render({
                elem: '#birthday',
                type: 'month',
                value: "{$info.birthday}"
            });
            //日期
            laydate.render({
                elem: '#working_hours',
                type: 'month',
                value: "{$info.working_hours}"
            });
            //日期
            laydate.render({
                elem: '#tenure',
                type: 'month',
                value: "{$info.tenure}"
            });
            //日期
            laydate.render({
                elem: '#part_time_tenure',
                type: 'month',
                value: "{$info.part_time_tenure}"
            });
            //日期
            laydate.render({
                elem: '#previous_tenure',
                type: 'month',
                value: "{$info.previous_tenure}"
            });
            //日期
            laydate.render({
                elem: '#starting_salary_time_of_the_current_year',
                type: 'month',
                value: "{$info.starting_salary_time_of_the_current_year}"
            });
            //日期
            laydate.render({
                elem: '#stoping_salary_time_of_the_current_year',
                type: 'month',
                value: "{$info.stoping_salary_time_of_the_current_year}"
            });


            //监听提交
            form.on('submit(demo1)', function (data) {
                $.ajax({
                    data: $('#submitform').serialize(),//json数据格式
                    url: "{:url('index/BaseInfo/editPost')}",
                    type: 'post',
                    success: function (res) {
                        if (res.code == 1) {
                            layer.msg(res.msg);
                            setTimeout(function () {
                                location.href = res.url;
                                window.parent.location.reload();
                            }, 1000)
                        } else {
                            layer.msg(res.msg);
                        }
                    }
                });
                
                return false;
            });




        });
    </script>
</body>

</html>